<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@ page import="java.sql.*" %> 
<%@ page import="java.io.*,java.util.Map,javax.servlet.http.HttpSession,java.util.LinkedHashMap" %> 
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
<%@include file="common.jsp" %>
</head>
<body>
<center>
<h3><u>Volunteer Introduction Form</u></h3></center>
<%@include file='howto.html'%>


<%
String service=request.getParameter("My view about service");
String inspiration=request.getParameter("Who/What inspired you to move towards service?");
String goal=request.getParameter("Why you choose OCMS is correct in achieving your goals?");

try
{
String email=request.getParameter("email");

ResultSet rs;
Connection con =org.tmad.ocms.dao.ConnectionManager.getDbConnection();
Statement stmt =con.createStatement();
 rs =stmt.executeQuery("select first_name,dob,address,city,email_id  from volunteer where email_id='"+email+"'");
%>
<b>1.Me At a Glance</b><br>
<TABLE  border="1" > 
<% 
while (rs.next()) 
{ 
%> 
<TR><TH>NAME</TH><TD><%=rs.getString("first_name")%></TD></TR> 
<TR><TH>DATE OF BIRTH</TH><TD><%=rs.getString("dob")%></TD> </TR>
<TR><TH>ADDRESS</TH><TD><%=rs.getString("address")%></TD> </TR>
<TR><TH>CITY</TH><TD><%=rs.getString("city")%></TD> </TR>
<TR><TH>EMAILID</TH><TD><%=rs.getString("email_id")%></TD> 
</TR><br>
<% 
} 
%>
<%

// close all the connections.

} 
catch (Exception ex) 
{ 
%> 

<% 
out.println("Unable to connect to database."); 
} 
%> 

</TABLE><br> 

<b>2.My view about service</b><br><br>&nbsp;&nbsp;&nbsp;<%=service %><br><br><br>
<b>3.Who/What inspired you to move towards service?</b><br><br>&nbsp;&nbsp;&nbsp;<%=inspiration %><br><br><br>
<b>4.Why you choose TMAD is correct in achieving your goals?</b><br><br>&nbsp;&nbsp;&nbsp;<%=goal %><br><br><br>
<%! String[] areas; %>
<b>5. Areas where you can involve yourself as a volunteer</b><br><br>
<% 
   areas = request.getParameterValues("areas");
   if (areas != null) 
   {
      for (int i = 0; i <areas.length; i++) 
      {
         out.println ("&nbsp;&nbsp;&nbsp;"+areas[i]+"<br>");
      }
   }
   else out.println ("<b>none<b>");
   setMenuItems(session);
   
  %><%!  private void setMenuItems(HttpSession session){  }%>
		<%Map<String, String> roleBasedMenu = new LinkedHashMap<String,String>();
		roleBasedMenu.put("index.jsp","Home Page");
		roleBasedMenu.put("newCase", "Submit new case");
		roleBasedMenu.put("casereg.jsp", "casedetails");
		roleBasedMenu.put("userlogin.jsp", "your profile");
		session.setAttribute("menu", roleBasedMenu);


%>


<%@include file="footer.jsp" %>

</body> 
</html>


